The invention relates to a monitoring circuit for a data transmission network, and in particular a Controller Area Network (xe2x80x9cCANxe2x80x9d).
One form of a data transmission system is a CAN system. The term CAN stands for Controller Area Network. Information about CAN systems in general can be found in the book xe2x80x9cController Area Network: CANxe2x80x9d by Konrad Etschberger, Carl Hanser Publishing House 1994, ISBN No. 3-446-17596-2. Of interest in the present context are the sections on Protocol Properties on pages 25 and 26 and Data/Frame Format on pages 37 to 43.
CAN systems are employed for example in the field of motor vehicles.
There is a common supply voltage source for the CAN system, e.g., in the form of a motor vehicle battery delivering for instance a battery voltage of 12 V. Furthermore, each network node has an individual operating voltage source associated with or inherent with each network node, which produces from the supply voltage a regulated operating voltage, e.g., in the amount of 5 V, feeding the respective network node. Each operating voltage source delivers an operating potential at a first terminal and a reference potential, for example ground potential or 0 V, at a second terminal.
At least part of the network nodes can act both as a transmitter and as a receiver. For this purpose such network nodes have a transmitting part and a receiving part.
The transmitting part of such a network node has two resistors and two controllable electronic switches connected to the two lines of the double-line bus. One of these lines is connected via a first one of these resistors to the operating potential (5 V) and via a first one of these switches to the reference potential (0 V). The other line is connected via the second resistor to the reference potential (0 V) and via the second switch to the operating potential (5 V). For transmitting digital communications, the two switches are controlled synchronously either to a conducting state or to a nonconducting state. When the switches are controlled to the non-conducting state, the operating potential is present on one line and the reference potential is present on the other line. This switch state, for example, has the logic value xe2x80x9c1xe2x80x9d associated therewith. When the switches are controlled to the conducting state, the reference potential is present on one line and the operating potential is present on the other line. This switch state then has the logic value xe2x80x9c0xe2x80x9d associated therewith.
As the transmitting parts of all network nodes capable of transmission are connected in parallel with respect to the two lines, the potential ratio on the two lines, which is associated with logic value xe2x80x9c0xe2x80x9d, can be produced by closing the two switches of each of the transmissive network nodes. On the other hand, the non-conducting state of the two switches of each network node can be covered up by the conducting state of the two switches of another network node. For this reason, the logic value associated with a closed switch pair (logic value xe2x80x9c0xe2x80x9d) is referred to as dominant and the logic value associated with a non-conducting switch pair (logic value xe2x80x9c1xe2x80x9d) is referred to as recessive.
The receiving part of each network node capable of reception comprises a comparator comparing the respective potentials on the two lines with each other. Upon reception of a recessive bit (logic value xe2x80x9c1xe2x80x9d), for example, a positive potential is created at the output of the comparator, which has the logic value xe2x80x9c1xe2x80x9d associated therewith. Upon reception of a dominant bit (logic value xe2x80x9c0xe2x80x9d), a potential corresponding to the reference potential is present at the output of the comparator, which then has the logic value xe2x80x9c0xe2x80x9d associated therewith. The comparator thus constitutes a decoder for the potential relationships corresponding to the respective transmitted bit on both lines.
For reasons of redundance, the two lines are used in addition to system ground. The message information corresponding to the potential value of the respective bit transmitted is thus transferred both via the one line and via the other line. In case of failure of one of the lines, the further transmission operation can be restricted to the non-failed line. For detecting line failures, two additional comparators can be provided, one thereof comparing the potential of one line and the other one thereof the potential of the other line with a mean potential that is between the operating potential and the reference potential.
There can occur different line failures or line faults or errors, for instance, in the form of short-circuits between the two lines, short-circuits towards system ground, short-circuits towards the operating potential source, short-circuits towards the supply voltage source or in the form of open lines. There are line errors that do not hinder secure decoding of the communications transmitted. There are other line errors against which specific measures need to be taken in order to still render possible correct decoding. More details in this respect can be found in DE 195 23 031 A1.
In a CAN network, the messages or communications are transferred in the form of pulse sequences or frames spaced apart in time. The usual CAN protocol provides that a minimum distance in time is present between the individual frames, that within one frame there must be no more than a predetermined number of successive recessive or dominant bits, and that all receptive network nodes confirm reception of the respective pulse sequence by sending a confirmation pulse during a predetermined time slot (in the following referred to as confirmation time slot), which is the same for all network nodes, at the end of the respective pulse sequence. Issuing of the conformation pulse takes place by controlling the second switch in each confirming network node to the conducting state.
When the line connected via its resistor to the reference potential has a short-circuit towards system ground, the network-node-inherent operating potential sources (5 V) of all confirming network nodes are shorted via the respectively associated second switch and are shorted via this short-circuit to system ground. As a result thereof, a high current pulse flows across the shorted line during such a confirmation time slot. When the CAN network has, for example, 40 receptive network nodes and when the network-node-inherent operating voltage source of each of these 40 network nodes delivers a current of 200 mA to the shorted line, a total current pulse of 8 A arises on this shorted line during the confirmation time slot.
Such high current pulses not only constitute a burden for the supply voltage source, but can also cause disturbances in the data transmission network. During the high shorting current, inductive energy is stored in the line inductance of the shorted line, which upon opening of the second switches of the confirming network nodes is discharged in the form of a voltage pulse on the shorted line. This voltage pulse can affect the non-shorted other line by cross-talk and may cause an interference pulse there. This interference pulse is erroneously interpreted as a communication bit, and the last frame transmitted is rated as having not been transmitted correctly, which causes repeated transmission of this frame. When the line short-circuit is still present during the confirmation time slot for this repeatedly sent frame, a high current pulse again results on the short-circuit line, and as a consequence thereof a new interference bit is created on the non-shorted line and renewed repeated transmission of the already repeated frame is caused. This continues on and on, and the data transmission network remains captive in this loop.
The invention provides a monitoring circuit for a data transmission network, comprising a plurality of transmissive and receptive network nodes and a double-line bus connecting the network nodes and serving for redundant double transmission of digital communications and having a first line and a second line via which communication pulses transferred in the form of pulse sequences spaced apart in time are transmitted in synchronous manner in terms of time slot. In doing so, at least part of the network nodes confirm reception of the respective pulse sequence by sending a confirmation pulse during a predetermined line slot that is the same for all network nodes. In at least part of the network nodes, the first line is connected via a first resistor to a network-node-inherent operating potential source and via a first controllable switch to a reference potential source, and the second line is connected via a second resistor to the reference potential source and via a controllable second switch to the operating potential source. The two switches are simultaneously controlled to the non-conducting state for transmission of a communication pulse having a first logic value and simultaneously controlled to the conducting state for transmission of a communication pulse having a second logic value. There is provided a potential change detector through which the two lines can each be monitored for the presence of potential change activities and by means of which a condition can be detected in which potential change activities occur during a pulse sequence only on the first line, but not on the second line. Furthermore, there is provided a first time measuring circuit through which a time measurement of the duration of such a condition can be carried out and by means of which, upon exceeding of a predetermined duration of such a condition, an error signal can be generated on the basis of which the second switches of at least part of the network nodes can be controlled to the non-conducting state.
In the monitoring circuit according to the invention, the two lines are each monitored separately with respect to the presence of potential change activities. In case a non-symmetrical potential change activity is ascertained in which potential change activities take place only on the first line, but not on the second line, it is assumed that a line error in the form of a short-circuit of the second line towards system ground can be present. In case of determination of such a non-symmetrical potential change activity, an error signal is, however, not generated immediately, but only after such a non-symmetrical potential change activity has taken place for a predetermined period of time. To this end, there is provided the first time measuring circuit producing an error signal at its output only when this period of time has been exceeded. In accordance with this error signal, the second switches of all receptive network nodes or at least part of the receptive network nodes are controlled to the non-conducting state. This prevents in all such network nodes that the respective operating voltage source thereof delivers a short-circuit current to system ground via the shorted line.
A non-symmetry with respect to the potential change activities on two lines may also be caused by isolated interference pulses on only one of the two lines. By means of the first time measuring circuit such interference pulses, in case of occurrence on the first line only, are prevented from triggering the error signal and thus initiating switching of the second switches to the non-conducting state. The measuring duration of the first time measuring circuit is selected such that successive interference pulses up to a predetermined number, for example up to the number of three, can not yet trigger the error signal. Thus, inactivity masking with respect to such interference pulses takes place.
In a preferred embodiment the first time measuring circuit is composed of an up/down counter that counts potential changes on the first line in an upward direction and potential changes on the second line in downward direction and that issues an error signal upon reaching a predetermined count, for example greater than three. As long as both lines display an equal number of potential changes, which is the case with an error-free bus, upward and downward counting operations alternate in succession, so that the predetermined count of, for example, three is not reached. In case a short-circuit on the second line towards system ground takes place, as of which potential changes still are reported by the first line only, the up/down counter performs only down-counting operations, and after three potential changes on the first line it reaches the predetermined count resulting in an error signal being issued at the output of the up/down counter.
The potential change detector may have two comparators by means of which the potentials of the two lines are each compared with a mean potential lying between the operating potential and the reference potential. The comparator monitoring the first line is coupled with the up-counting input and the comparator monitoring the second line is coupled with the down-counting input of the up/down counter.
Between the two comparators and the two counting inputs of the up/down-counter there is preferably provided one differentiating member each by means of which potential changes are converted to countable pulses. The differentiating members can be designed to have a rectifying effect so that each potential change can become a countable pulse.
When the up/down counter has reached the predetermined count at which it issues an error signal, this error signal is maintained irrespective of whether or not the underlying line error is still present. This may be intended, for example, for being able to determine at a time of inspection or diagnosis that such an error had occurred even though it is no longer present at the time of inspection or diagnosis.
In another embodiment it is repeatedly examined whether or not the line error is still present. For example, a short-circuit of a line towards system ground each time can occur for a short period of time only, for example, when a line having a rubbed-off insulation briefly touches system ground only in case of extreme vibrations of a motor vehicles, while it is remote from system ground for most of the time.
For this purpose, an embodiment of the invention provides a circuit through which, at the beginning of each new pulse sequence or a new (message) frame, an examination is made as to whether or not the line error ascertained during the preceding frame is still present. For this purpose, there may be provided a resettable second time measuring circuit having the error signal applied to the input side thereof and configured to output a switch control signal that switches the second switches to the non-conducting state, being reset a predetermined duration after the end of the frame, and, starting from the respective resetting time, masking a possibly existing error signal for a predetermined measuring duration. This means that an error signal that is still present at the time of resetting can initiate the switch control signal again when the error signal is still present after expiration of the measuring duration of the second time measuring circuit. During this measuring duration, the up/down counter is down-counting below the count triggering the error signal when the line error is not present at the beginning of the next frame.
The second time measuring circuit can be constituted by a counter having a clock input connected to a counting clock source, and having a counting release input serving to have the error signal applied thereto. Only when this counter, after resetting thereof, performs up-counting to a specific count as the counting release input thereof has been fed with the error signal for a correspondingly long duration, will the switch control signal be issued at the output thereof.
In order to provide, in case the line error considered is not present at the beginning of a new frame, that the up/down counter, within the masking time of the second time measuring circuit, can perform rapid and secure down-counting from the count on the basis of which it has issued the error signal during the preceding frame, an embodiment of the monitoring circuit according to the invention provides a priority circuit between the potential change detector and the counting inputs of the up/down counter. When both counting inputs are fed with potential change pulses because both lines again display potential change activities, the effect achieved by this priority circuit is that down-counting according to the potential change activity of the previously error-inflicted line now has priority over up-counting according to the potential change activity of the other line.
For detecting the respective frame end, there may be provided a third time measuring means, to which are signalled changes in potential difference between the two lines and which upon each signalled potential difference change can be reset to an initial state. When a predetermined duration is exceeded as of the last resetting operation without a new resetting taking place, it is assumed that the end of respective frame has been reached, and the third time measuring circuit issues a resetting signal by means of which the second time measuring circuit is reset. In this manner, the second time measuring means is brought to its masking time measuring state before the beginning of each new frame, within which the error signal is not converted by the first time measuring means to a switch control signal for switching the second switches of the receptive network nodes to the non-conducting state.
The third time measuring means can be comprised of a third counter, which at a counting clock input is fed with counting clocks and which at a resetting input receives as a resetting signal the signal for potential difference changes on the two lines. Preferably, the resetting input of the third time measuring means also has a differentiating member connected upstream thereof, which preferably operates in a rectifying manner in order to convert each signalled potential difference change to a pulse.